Skip to content

feat(ui-message-list): add message contexts and content parts - #43724

Draft
gabriellsh wants to merge 12 commits into
message-list/02-list-fixesfrom
message-list/03-contexts-and-content
Draft

gabriellsh wants to merge 12 commits into
message-list/02-list-fixesfrom
message-list/03-contexts-and-content

Conversation

@gabriellsh

@gabriellsh gabriellsh commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Adds the first real code of @rocket.chat/ui-message-list: the ten message contexts (display, navigation, interactions, toolbar, renderers, related data, content, media, selection and editing), each with a working default, and the message content parts that are not attachments (markdown body, reactions with their tooltip, URL previews, location, action links, thread, discussion and broadcast metrics, collapsible, ignored content). On the app side it adds MessagesProvider, which supplies those contexts from the app, and switches the app's message variants to the package's content parts. The app's copies of those parts are deleted.

Because the old lists stay until later parts, MessagesProvider is mounted wherever MessageListProvider is, and in every place that renders message parts outside a list (audit, moderation, contact history, modals, the composer's quote), read-only ones with allowsInteraction={false}. The old list context stays in agreement with the new display context.

Twelve commits: intent, spec and plan; a fixture; a refactor that extracts how a message is normalized; the package contexts and content; the provider; the mounts; the switch; the deletion; docs.

Spacing in the package's parts uses the spacing scale tokens. The two entries of scripts/spacing-scale/baseline.json for app files this PR deletes (MessageActions.tsx, OEmbedPreviewContent.tsx) go with them. The specs develop added in #43386 for the URL previews, the reaction tooltip and the message normalization are ported into the package's specs and the provider's.

The package gains its test-storybook script, run under TZ=UTC, with its first stories.

This is part 03 of the stack (00 to 09). Review it against its base branch message-list/02-list-fixes, not against develop.

Stack

Visible changes

.changeset/read-only-messages-follow-display-settings.md, '@rocket.chat/meteor': minor: messages in audits, moderation reports, contact history, the forward, pin and report dialogs, the composer's quote and the threads list now highlight the viewer's highlight words; audits, moderation reports and contact history show real names in mentions when real names are on; audits render hex colors and KaTeX as the settings say; attachments in audits, moderation reports, contact history and the forward dialog follow the viewer's media preferences, sized at 360 pixels and linked from the server's address as in rooms.

Known differences from develop

Besides the read-only look above (kept on purpose, see the spec):

  • the emoji data-title attribute is no longer passed;
  • thread metrics need allowsInteraction, so a place that allows none shows no follow control;
  • the cover image link of a link preview gains an accessible name (the page title, or the URL);
  • a message fetched for a reaction tooltip is not added to the room's store;
  • modals and the composer's quote pass no mentions, so they show usernames.

Issue(s)

Steps to test or reproduce

In a room, check that all of these look and behave as on develop:

  • a message with markdown, mentions, a highlight word and KaTeX;
  • reactions: add, remove, and the tooltip names (real names when they are on);
  • a link preview, including the accessible name of its cover link;
  • a shared location;
  • a message with action links (for example a livechat transcript button);
  • a thread's metrics with follow and unfollow and the unread badge;
  • a discussion's metrics, and a broadcast reply.

Read-only places (new look, named in the changeset):

  • audit, moderation, contact history, the forward, pin and report dialogs, the composer's quote and the threads list show highlight words, and real names in mentions where listed above;

Further comments

Decisions to check

  • RoomMessageContent.tsx goes from complexity 41 to 42 (limit 31), a warning that was already there.
  • Changesets for @rocket.chat/ui-message-list. This PR adds none for the private package; parts 08 and 09 of the stack do. The repo versions private packages (other private packages carry changesets), so 08 and 09 follow the repo, and 03 to 07 may need changesets too. Undecided.

Not run

  • The e2e suites, and the app in a browser.
  • Checks ran on the branch tip only, not commit by commit.
  • The read-only differences per place are proven by specs for the audit and the pin dialog; the other places are covered by mount probes and the manual pass above.

🤖 Generated with Claude Code

@dionisio-bot

dionisio-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is still a draft
  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5917e63

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.62829% with 160 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.30%. Comparing base (cb3f762) to head (5917e63).

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           message-list/02-list-fixes   #43724      +/-   ##
==============================================================
+ Coverage                       71.23%   71.30%   +0.06%     
==============================================================
  Files                            5567     5624      +57     
  Lines                          247891   250477    +2586     
  Branches                        46427    46723     +296     
==============================================================
+ Hits                           176597   178606    +2009     
- Misses                          66907    67493     +586     
+ Partials                         4387     4378       -9     
Flag Coverage Δ
e2e 63.01% <50.21%> (+0.10%) ⬆️
e2e-api 49.45% <ø> (-0.28%) ⬇️
unit 70.13% <88.62%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

gabriellsh and others added 12 commits November 13, 2026 17:59
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
The message components' specs and stories need messages that are the same on every run.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Ten contexts carry what the message components need from the app, each with a
default that works without a provider. mockMessageProviders wraps a component
in all of them with spies for tests.

ui-message-list message-capabilities R1-R7

Co-Authored-By: Claude <noreply@anthropic.com>
Body and markdown, reactions with their tooltip, URL previews, a shared
location, action links, thread, discussion and broadcast metrics, and
collapsible parts. Attachments are not included; the collapsible brings the
download and size controls it shows.

The reaction tooltip asks for the message by its emoji and the people who
reacted, so a reaction added later is named with real names on the next hover.

The first stories come with the Storybook play test script, which runs in
UTC as CI does.

ui-message-list message-capabilities R8-R25

Co-Authored-By: Claude <noreply@anthropic.com>
MessagesProvider gives the ui-message-list message components what they take
from the app: settings and preferences, the router, the chat and its composer,
modals, REST calls, the markdown, UiKit and emoji renderers and the selection.
The toolbar, media and editing values arrive with the parts that read them.

The old list provider mounts it, so the display context agrees with the old
list context, and GazzodownText reads highlights and real names from it.
Reacting keeps the base's guard: no reaction and no picker without a user.
The messages the reaction tooltip fetches are keyed by the emoji and the
people who reacted, so someone who reacts after a first hover, with this or
another emoji, is named on the next one.

Departure from the plan: the old list provider mounts the whole
MessagesProvider with its own room and subscription, instead of a
display-only bridge. It gives the same agreement (R33) and mounts the provider
at every list at once.

ui-message-list message-capabilities R14, R26-R31, R33

Co-Authored-By: Claude <noreply@anthropic.com>
…ists

The threads list, audit, moderation's reported messages, contact history, the
forward, pin and report modals and the composer's quote render message parts,
so each gets a MessagesProvider; the read-only ones take no interaction.

These places now follow the viewer's display settings, as the lists do. The
threads list, the audit, moderation, contact history, the modals and the
composer's quote highlight the viewer's highlight words; moderation, contact
history and the audit show real names in mentions; the audit parses hex colors
and KaTeX as the settings say; the attachments of the audit, moderation,
contact history and the forward modal take the viewer's media preferences and
are sized and linked as in the lists. This was decided by the user at review.
A changeset records it.

useNormalizedMessage now reads the message content of MessagesProvider, so
its own spec goes; MessagesProvider's spec proves the same cases.

ui-message-list message-capabilities R32, R36, R37, R38, R39

Co-Authored-By: Claude <noreply@anthropic.com>
The message variants, the attachments, the threads list's metrics and the
places that show a message body outside a list read the body, ignored content,
fallback, reactions, URL previews, location, action links and metrics from
ui-message-list. The app's copies stay until nothing reads them.

ui-message-list message-capabilities R34

Co-Authored-By: Claude <noreply@anthropic.com>
The app's copies of the body, ignored content, fallback, reactions, URL
previews, location, action links and metrics go, with the hooks only they used
and the fields of the old list context only they read. Attachments keep the
collapsible, download and map parts they still import.

Also deleted: components/message/content/actions/MessageAction.tsx and
MessageAction.stories.tsx, which nothing imported any more. The specs of the deleted URL previews and
reaction tooltip go with them; the package's specs prove the same cases. The
spacing baseline drops the deleted files.

Departure from the plan: the switch to the package parts and the deletion of
the copies are two commits, so each stands on its own.

ui-message-list message-capabilities, retired R35

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@gabriellsh
gabriellsh force-pushed the message-list/03-contexts-and-content branch from abf2e82 to 5917e63 Compare November 14, 2026 14:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant